<script type="text/javascript"
     src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

<head>
    <link rel="stylesheet" href="stylesheet_TMATS.css">
</head>

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

<title>
    T-MATS: Help for 1D Trans Cond Model (FDE) Library Block
</title>    

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

<body>
    <h1>
      T-MATS: 1D Trans Cond Model (FDE) Library Block
    </h1>
<hr>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

<div class="purpose">
        Purpose
</div>

<p>
    This block is used to model the transient conduction of a plate with 
    fluid on either side, via the finite difference method (explicit).
</p>
<p>
    <em>Note:</em> This block has become obsolete and will not be supported
    in future releases. For a more versatile option, see the 1-D Trans 
    Conduction Model - Variable Props + Generic BCs block (documentation 
    <a href="HeatXfer_TMATS_1DTCondVarPropGenBC.html">here</a>).
</p> 

<br>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

<div class="background">
        Background
</div>    

<p>
    To compute the output values, this block utilizes an explicit finite 
    difference method to determine the effects of heat transfer. It is important
    to note that the units must be specified consistently while using this block
    (i.e. If temperature is in Celsius all temperature units must in Celsius)
    and that the export values are calculated based on a single time step. 
    If additional dynamic behavior is required, a Simulink Memory block may
    be used to update the temperature initial conditions.
</p>
<p>
    This block begins by computing the <i>dx</i> step amount, the thermal diffusivity 
    constant, the Biot number, and the Fourier number. These parameters are
    determined by the following equations, respectively:
    
    $$dx = \frac{X}{N-1}$$
    $$ \alpha = \frac{k}{\rho * Cp}$$
    $$ Bi = \frac{h*dx}{k}$$
    $$ Fo = \frac{dt* \alpha}{dx^2}$$
    
    In the first equation, <i>X</i> is the width of the plate and <i>N</i> 
    is the number of nodes. The other variables are properites of the plate.
    All of these values are specified by the user and can be adjusted by 
    double clicking the block and editing the corresponding values. 
</p>
<p>
    With these parameters calculated, the block then uses a MATLAB script to
    determine the output temperatures. Since the system being evaluated is 
    1-D, the following equation is the explicit form of the finite difference 
    method for an interior node:
    
    $$T_m^{p+1} = Fo*\left(T_{m+1}^p + T_{m-1}^p\right) + (1- 2*Fo)*T_m^p$$
    
    As seen in the above equation, the unknown temperatures for the new
    time step are determine by the known temperature values from the previous 
    time step, making the method explicit. Additionally, <i>m</i> represents
    the location of the node and <i>p</i> represents the time dependence. New 
    time step values are represented by <i>p+1</i> while the old time step 
    values are represented by <i>p</i>. For more information on this process,
    see the book reference at the bottom of this page.
</p>
<p>
    The boundary temperature values are determined by the following equation:
    
    $$T_0^{p+1} = 2*Fo*\left(T_1^p + Bi*T_{\infty}\right) + (1 - 2*Fo - 2*Bi*Fo)*T_0^p$$

    The final parameter determined by this block is the average temperature, 
    which is determined by the following equation:
    
    $$Tavg = \frac{\sum(TNext * Nw)}{\sum Nw}$$
    
    In the above equation, <i>Nw</i> is the vector containing the <i>dx</i>
    values.
</p>
    

<br>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

<div class="instructions">
        Instructions
</div>

<p>
    To use this block:
    <ul>
        <li> Connect the inputs to the corresponding places on the block.
        <li> Connect the outputs to the next blocks in the simulation.
        <li> Double click the block and specify the properties of the plate.
        <li> Ensure that temperature units are consistent throughout this block.
    </ul>
</p>


<br><hr><br>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

<div class="inputs">
        1D Trans Cond Model (FDE) Inputs     
</div>

<table> 
    <tr><th> Input </th><th>Description</th></tr>
    <tr><td>Tinner</td><td>Inner Fluid Temperature</td></tr>
    <tr><td>Touter</td><td>Outer Fluid Temperature</td></tr>
    <tr><td>TiVec</td><td>Initial Temperature at each Node (mx1)</td></tr>
</table>

<br><br>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

<div class="outputs">
        1D Trans Cond Model (FDE) Outputs  
</div>

<table> 
    <tr><th> Output </th><th> Description </th></tr>
    <tr><td>Tavg</td><td>Final Average Temperature within the Plate</td></tr>
    <tr><td>TfVec</td><td>Final Temperature at each Node (mx1)</td></tr>
    <tr><td>Xdist</td><td>Placement of each Node (mx1)</td></tr>
</table>

<br><br>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

<div class="maskvars">
        1D Trans Cond Model (FDE) Mask Variables 
</div>
 
<table> 
    <tr><th> Mask Variable </th><th> Description </th></tr>
    <tr><td>dt_M</td><td>Time Step</td></tr>
    <tr><td>Nod_M</td><td>Number of Nodes, m</td></tr>
    <tr><td>w_M</td><td>Plate total Width</td></tr>
    <tr><td>h_M</td><td>Material Convection Heat Transfer Coefficient</td></tr>
    <tr><td>k_M</td><td>Material Thermal Conductivity (k)</td></tr>
    <tr><td>rho_M</td><td>Material Density (rho)</td></tr>
    <tr><td>c_M</td><td>Material Specific Heat (C)</td></tr>
    <tr><td>BlkNm_M</td><td>Block Name (hidden from view)</td></tr>
</table>


<br><hr><br>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

<div class = "errors">
    Potential Errors
</div>
<p>
When using this block, you may receive one of the following errors/warnings. The table
below lists the errors/warnings that you may see and the reason why it is being displayed.
</p>
<table> 
    <tr><th> Error/Warning </th><th>Description</th></tr>
    <tr><td>Fo > 0.5, input properties are not appropriate for modeling method.</td><td>
                This error will occur if the Fourier number is determined to be 
                greater than 0.5, which indicates that the system will be unstable.
                A different modeling method for the system should be chosen, or 
                the input parameters should be changed.
    </td></tr>
    <tr><td>Fo*(1+Bi) > 0.5, input properties not appropriate for modeling method. </td><td>
                This error will occur if Fo*(1+Bi) is determined to be 
                greater than 0.5, which indicates that the system will be unstable.
                A different modeling method for the system should be chosen, or 
                the input parameters should be changed.
    </td></tr>
</table>

<br><hr><br>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<div class="table_caption">
    Reference
</div>
    
<p>
    The equations used in this block model the heat transfer of a plate with
    fluid or material on either side via the finite difference method 
    (explicit), based on equations from Section 5.9.1 of "Fundamentals of 
    Heat and Mass Transfer" 5th edition, by F. Incropera and D. DeWitt.
</p>
<br><br>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
</body>